package com.xbj.cloud.commons.apis;

import com.xbj.cloud.commons.entities.PayDTO;
import com.xbj.cloud.commons.resp.ResultData;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

@FeignClient(value = "pay8001")
public interface Pay8001FeignApi {
    /**
     * @Author 木火
     * @Date  2024/8/21
     * @Param
     * @Description 新增支付流水方法
     **/
    @PostMapping(value = "/pay/add2")
    public ResultData<String> addPay2(@RequestBody PayDTO pay);

    /**
     * @Author 木火
     * @Date  2024/8/21
     * @Param
     * @Description 查询支付流水
     **/
    @GetMapping(value = "/pay/getById/{id}")
    public ResultData getById(@PathVariable("id") Integer id);

    /**
     * @Author 木火
     * @Date  2024/8/21
     * @Param
     * @Description 查询支付流水-超时
     **/
    @GetMapping(value = "/pay/getByIdTimeOut/{id}")
    public ResultData getByIdTimeOut(@PathVariable("id") Integer id);

    /**
     * @Author 木火
     * @Date  2024/8/26
     * @Param
     * @Description 熔断测试
     **/
    @GetMapping(value = "/payCircuit/getById/{id}")
    public ResultData payCircuitGetById(@PathVariable("id") Integer id);

    /**
     * @Author 木火
     * @Date  2024/8/26
     * @Param
     * @Description 舱壁测试
     **/
    @GetMapping(value = "/payBulkhead/getById/{id}")
    public ResultData payBulkheadGetById(@PathVariable("id") Integer id);

    /**
     * @Author 木火
     * @Date  2024/8/30
     * @Param
     * @Description Micrometer(服务链路追踪)测试方法
     **/
    @GetMapping(value = "payMicrometer/testMicrometer/{id}")
    public ResultData testPayMicrometer(@PathVariable(value = "id") Integer id);
}
